﻿using System;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Collections.Generic;

namespace Server
{
    [ServiceContract]    
    public interface IChat
    {
        [OperationContract]
        string ReverseString(string str);

        [OperationContract]
        bool Join(string nickname);

        [OperationContract]
        void Disconnect(string nickname);

        [OperationContract]
        void ReceiveMessage(string nickname, string message);

        [OperationContract]
        Tuple<int, List<Tuple<string,string>>> GetNewMessages(string nickname, int idLastMessage);

        [OperationContract]
        List<string> Users();

        [OperationContract]
        bool Live();
    }
}
